//
//  XMScrollViewImageCell.m
//  XMKit
//
//  Created by Ce Liu on 2018/5/29.
//  Copyright © 2018年 ChenXiaoMing. All rights reserved.
//

#import "XMScrollViewImageCell.h"

@implementation XMScrollViewImageCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self.contentView addSubview:self.scrollImageView];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.scrollImageView.frame = self.bounds;
}

- (UIImageView *)scrollImageView {
    if (!_scrollImageView) {
        _scrollImageView = [[UIImageView alloc] init];
        _scrollImageView.backgroundColor = [UIColor whiteColor];
        _scrollImageView.contentMode = UIViewContentModeScaleAspectFill;
        _scrollImageView.clipsToBounds = YES;
    }
    return _scrollImageView;
}

@end
